package cn.dengta.webapp.trade.entity;

import java.math.BigDecimal;

import cn.dengta.common.util.*;
import cn.dengta.webapp.base.entity.BizEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

/**
 * 积分兑换钻石配置
 *
 * @author hsj
 * @since 2024-02-23
 */
@Setter
@Getter
@TableName("dt_integral_exchange_coin_config")
public class IntegralExchangeCoinConfig extends BizEntity {

	/** 钻石 */
	Integer coin;
	/** 积分 */
	BigDecimal integral;
	/** 兑换次数 */
	Integer exchangeCount;
	/** 分包支持 */
	String wesKits;

	public static final String COIN = "coin";
	public static final String INTEGRAL = "integral";
	public static final String EXCHANGE_COUNT = "exchange_count";

	/** 用户保存数据库 assoc_type */
	public static class IntegralExConfig extends IntegralExchangeCoinConfig {

		public static IntegralExConfig of(IntegralExchangeCoinConfig config) {
			IntegralExConfig integralExConfig = new IntegralExConfig();
			BeanUtil.copyProperties(config, integralExConfig);
			return integralExConfig;
		}

	}

}
